class Solution:
    def findRepeatedDnaSequences(self, s: str) -> list:
        if len(s) <= 10:
            return []
        mid_set, res = {s[:10]}, set()
        for i in range(1, len(s) - 9):
            if s[i:i+10] in mid_set:
                res.add(s[i:i+10])
            else:
                mid_set.add(s[i:i+10])

        return list(res)


a = Solution()
print(a.findRepeatedDnaSequences("AAAAACCCCCAAAAACCCCCCAAAAAGGGTTT"))
print(a.findRepeatedDnaSequences("AAAAAAAAAAA"))
